package com.cdplife.ci.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 保单合同表
 * </p>
 *
 * @author jers
 * @since 2018-11-07
 */
@TableName("policy")
public class Policy extends Model<Policy> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("created_by")
    private String createdBy;
    @TableField("last_modified_by")
    private String lastModifiedBy;
    /**

     * 保险公司ID
     */
    @TableField("insurance_id")
    private Integer insuranceId;
    /**
     * 保单号
     */
    @TableField("policy_code")
    private String policyCode;
    /**
     * 保单生效日期
     */
    @TableField("effective_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date effectiveDate;
    /**
     * 保单失效日期
     */
    @TableField("invalid_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date invalidDate;
    /**
     * 保单类型：1集合保单 2独立保单
     */
    @TableField("policy_type")
    private Integer policyType;
    /**
     * 所属客户ID
     */
    @TableField("tenant_id")
    private Integer tenantId;
    /**
     * 缴费周期：1月缴 2季缴 3年缴
     */
    @TableField("payment_cycle")
    private Integer paymentCycle;
    /**
     * 计费方式：1按天计费 2按月计费
     */
    @TableField("charge_mode")
    private Integer chargeMode;
    /**
     * 截至日
     */
    private Integer deadline;
    /**
     * 备注信息
     */
    private String comment;
    /**
     * 保单状态：0待生效 1生效 2失效
     */
    @TableField("policy_stauts")
    private Integer policyStauts;
    /**
     * 附件个数，冗余字段
     */
    @TableField("accessory_num")
    private Integer accessoryNum;
    @TableField("linkman")
    private String linkman;
    @TableField("duty")
    private String duty;
    @TableField("tel")
    private String tel;
    @TableField("mobile")
    private String mobile;
    @TableField("email")
    private String email;

    @TableField("is_del")
    private Integer isDel = 0;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }


    public String getLastModifiedBy() {
        return lastModifiedBy;
    }

    public void setLastModifiedBy(String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }


    public Integer getInsuranceId() {
        return insuranceId;
    }

    public void setInsuranceId(Integer insuranceId) {
        this.insuranceId = insuranceId;
    }

    public String getPolicyCode() {
        return policyCode;
    }

    public void setPolicyCode(String policyCode) {
        this.policyCode = policyCode;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public void setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
    }

    public Integer getPolicyType() {
        return policyType;
    }

    public void setPolicyType(Integer policyType) {
        this.policyType = policyType;
    }

    public Integer getTenantId() {
        return tenantId;
    }

    public void setTenantId(Integer tenantId) {
        this.tenantId = tenantId;
    }

    public Integer getPaymentCycle() {
        return paymentCycle;
    }

    public void setPaymentCycle(Integer paymentCycle) {
        this.paymentCycle = paymentCycle;
    }

    public Integer getChargeMode() {
        return chargeMode;
    }

    public void setChargeMode(Integer chargeMode) {
        this.chargeMode = chargeMode;
    }

    public Integer getDeadline() {
        return deadline;
    }

    public void setDeadline(Integer deadline) {
        this.deadline = deadline;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Integer getPolicyStauts() {
        return policyStauts;
    }

    public void setPolicyStauts(Integer policyStauts) {
        this.policyStauts = policyStauts;
    }

    public Integer getAccessoryNum() {
        return accessoryNum;
    }

    public void setAccessoryNum(Integer accessoryNum) {
        this.accessoryNum = accessoryNum;
    }

    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Policy{" +
        ", id=" + id +
        ", createdBy=" + createdBy +
        ", lastModifiedBy=" + lastModifiedBy +
        ", insuranceId=" + insuranceId +
        ", policyCode=" + policyCode +
        ", effectiveDate=" + effectiveDate +
        ", invalidDate=" + invalidDate +
        ", policyType=" + policyType +
        ", tenantId=" + tenantId +
        ", paymentCycle=" + paymentCycle +
        ", chargeMode=" + chargeMode +
        ", deadline=" + deadline +
        ", comment=" + comment +
        ", policyStauts=" + policyStauts +
        ", accessoryNum=" + accessoryNum +
        "}";
    }
}
